<%@ page language="java" contentType="text/html; charset=UTF-8"  
    pageEncoding="UTF-8"%>  

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="component/jquery-3.1.1.js"></script> 
<title>Edit Option</title>  
</head>  
<body>
<script>
$(document).ready(function(){
	var optionNumber=$("#optionNumber").val();
	/* alert("quesStatus:"+typeof(quesStatus));
	alert("quesCategory:"+typeof(quesCategory)); */
	switch (optionNumber)
	{
	case 'A':
		$("#optionNumberA").attr("selected","selected");
	  break;
	case 'B':
		$("#optionNumberB").attr("selected","selected");
	  break;
	case 'C':
		$("#optionNumberC").attr("selected","selected");
	  break;
	case 'D':
		$("#optionNumberD").attr("selected","selected");
	  break;
	default:
		alert("选项错误！optionNumber error！");
	}
});

</script>
<form action="editOption.action" method="post">
  <input id="optionNumber" type="hidden" value="${optionLast.optionNumber}"/>
  <label>Option Number:</label> 
  <select name="optionNumber">
			<option id="optionNumberA" value="A">A</option>
			<option id="optionNumberB" value="B">B</option>
			<option id="optionNumberC" value="C">C</option>
			<option id="optionNumberD" value="D">D</option>
  </select><br/> 
  <label>Option Name:</label> 
  <input type="text" name="optionName"  value="${optionLast.optionName}"/><br/> 
  <input type="submit" value="Save " style="color: white; background-color: blue" />
</form>
</body>  
</html>  
